home *** CD-ROM | disk | FTP | other *** search
- #
- # Demon Dialup script
- #
- # Version: @(#)sample.dip 1.40 07/20/93
- #
- # Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- #
-
- main:
- # First of all, set up our name for this connection.
- # I am called "desklamp"
- get $local 158.152.44.250
-
- # Next, set up the other side's name and address.
- # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
- get $remote 158.152.1.65
- # Set netmask on sl0 to 255.255.255.0
- netmask 255.255.255.0
- # Set the desired serial port and speed.
- port ttyb
- #modem HAYES
- speed 9600
-
- # Reset the modem and terminal line.
- # This seems to cause trouble for some people!
- #reset
-
- # Note! "Standard" pre-defined "errlevel" values:
- # 0 - OK
- # 1 - CONNECT
- # 2 - ERROR
- #
- # You can change those grep'ping for "addchat()" in *.c...
-
- # Prepare for dialing.
- send ATQ0V1E1X4\r
- wait OK 10
- #send AT0
- #wait OK 2
- if $errlvl != 0 goto modem_trouble
- dial 99999999
- sleep 15
- if $errlvl != 1 goto modem_trouble
-
- # We are connected. Login to the system.
- login:
- sleep 2
- wait ogin: 40
- if $errlvl != 0 goto login_error
- send username\n
- wait ord: 20
- if $errlvl != 0 goto password_error
- send password\n
- wait col: 30
- if $errlvl != 0 goto no_protocol
- print Doing protocol
- send SLIP\n
- loggedin:
-
- # We are now logged in.
- wait HELLO 15
- if $errlvl != 0 goto prompt_error
- print Way Hay!!!
- # Set up the SLIP operating parameters.
- get $mtu 296
- # Ensure "route add -net default xs4all.hacktic.nl" will be done
- print Doing routing
- default
-
- # Say hello and fire up!
- done:
- print CONNECTED $locip ---> $rmtip
- mode SLIP
- goto exit
-
- no_protocol:
- print Protocl Problem with sending to dmeon
- goto error
-
- prompt_error:
- print TIME-OUT waiting for SLIPlogin to fire up...
- goto error
-
- login_trouble:
- print Trouble waiting for the Login: prompt...
- goto error
-
- password:error:
- print Trouble waiting for the Password: prompt...
- goto error
-
- modem_trouble:
- print Trouble ocurred with the modem...
- error:
- print CONNECT FAILED to $remote
- quit
-
- exit:
- exit
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-